#pragma once

#include <memory>
#include <string>

#include "../Network/RBF.h"

using namespace std;

class CRBFLearn
{
public:
	CRBFLearn() = delete;

	CRBFLearn(shared_ptr<RBF> rbfNetwork, double RLSLamada);

public:
	virtual void TrainingKMeansLayer(const Vector & trainingData);

	virtual void TrainingRLSLayer(const Vector & trainingData, const Vector & exceptData, double errorField);

private:
	int FindNearCenter(const Vector & trainingData);

	void MoveCenter(const Vector & trainingData, int J);

	void RLSLearn(Matrix & FAI, double exceptValue, CRLSNeuron & rlsNeuron, double errorField);

private:
	shared_ptr<RBF> m_RBF;
};